1. Field of the Invention
Aspects of the present invention relate to a universal serial bus (USB) communicating method and, more particularly, to an interface between a USB host and USB device.
2. Description of the Related Art
The universal serial bus (USB) is a serial port developed to standardize an interface for connecting computer peripherals to a computer. Examples of computer peripherals include mice, keyboards, printers, modems, or speakers. USB makes installation and removal of a device easy and fast, and is therefore widely used as current PC standard equipment.
FIG. 1 is a block diagram illustrating a general USB communication method. A general USB system includes a USB host and a USB device. The USB host (hereinafter referred to as a host) is generally a PC, and the USB device (hereinafter, referred to as a device) is generally a peripheral device having a USB interface. The host includes client software (SW), USB System SW, and a USB bus interface. The device includes a Function, a USB logical device, and a USB bus interface. The Function is a collection of interfaces that each provide functionality for the USB device. The host and the device are connected to each other via a USB cable.
The client SW is a part of the USB host that actually uses the Function of the USB device. The flow of all data generated by the client SW to use the Function of the USB device will now be described. The data that the client SW generates to use the Function of the USB device is transmitted to the USB bus interface of the device via the system SW, a host controller, and a USB cable. The data is transmitted from the USB Bus Interface to the Function via the USB logical device. The Function of the USB device processes the data transmitted by the client SW of the USB host. Data that the Function of the USB device transmits to the client SW of the USB host flows in the order opposite to that of the data transmitted by the client SW.
The USB device may belong to a specific USB class according to the type of function that the USB device provides. For example, the USB device may belong to a printer class, a mass storage device class, or a Human Interface Device (HID) class. The substance and form of data transmitted between the client SW of the USB host and the Function of the USB device depend on the type of USB class to which the USB device belongs, and are defined in the USB class specification. The client SW and the USB System SW, which exists in a level lower than the client SW, exchange the data defined in the USB class specification. Similarly, the Function and the USB logical device, which are included in the USB device, exchange the data defined in the USB class specification. The data is physically transmitted via the USB cable. However, in a logical sense, the data is transmitted and received between the client SW of the USB host and the Function of the USB device. A path taken by this transmission is referred to as a pipe, and an end of the pipe in the USB device is referred to as an endpoint.
When the USB device is connected to the USB host via the USB cable, enumeration occurs. Enumeration is a process in which the USB host determines the type and number of endpoints of the USB device, the type of a product (for example, a peripheral device), and the like. In this process, the host allocates addresses to the device and receives a device descriptor and a configuration descriptor from the device in order to prepare for transmission and reception of data. This process is performed during transmission and reception of data between the USB system SW of the USB host and the USB logical device (i.e., an endpoint 0) of the USB device. The data transmitted and received in this process is referred to as setup data. A logical transmission path for transmitting and receiving the setup data is referred to as a default pipe.
Consequently, the data transmitted and received between the client S/W of the USB host and the function of the USB device and the setup data transmitted and received between the USB system SW of the USB host and the USB logical device is logically transmitted via the pipe, but physically transmitted via the USB cable. Due to a physical limitation of the USB cable, the USB host and the USB device can communicate with each other when both are within about 5 meters of each other. Hence, a user should only use a device that is adjacent to a host.